import request from '@/http/index'

// 查询航班列表
export function listFlight(query) {
  return request({
    url: '/xqf-flight/flight/list',
    method: 'get',
    params: query
  })
}

// 查询航班详细
export function getFlight(fid) {
  return request({
    url: '/xqf-flight/flight/' + fid,
    method: 'get'
  })
}

// 新增航班
export function addFlight(data) {
  return request({
    url: '/xqf-flight/flight',
    method: 'post',
    data: data
  })
}

// 修改航班
export function updateFlight(data) {
  return request({
    url: '/xqf-flight/flight',
    method: 'put',
    data: data
  })
}

// 删除航班
export function delFlight(fid) {
  return request({
    url: '/xqf-flight/flight/' + fid,
    method: 'delete'
  })
}
